//余料盘点
var pageii = null;
var grid = null;
$(function() {

	grid = lyGrid({
		pagId : 'paging',
		l_column : [ {
			colkey : "createtime",
			name : "日期",
			
		}, {
			colkey : "time",
			name : "时间",
		},
		 {
			colkey : "cageareaname",
			name : "笼的区域",
		},
		{
			colkey : "cageno",
			name : "笼的编号",
			
		}, {
			colkey : "suppliestypes",
			name : "物料型号",
		}, {
			colkey : "dentsitys",
			name : "密度",
		}, {
			colkey : "surpluskg",
			name : "剩余量(kg)",
		}, {
			colkey : "surplusfeedratekg",
			name : "剩料量",
		}, 
	],
		jsonUrl : rootPath + '/prestock/prestockcheck_findByPage.shtml',
		dymCol:true,
		checkbox : true,
		serNumber : false
	});
	
	$("#addFun").click("click", function() {
		addStock();
	});
	
	function addStock() {
		pageii = layer.open({
			title : "新增余料盘点",
			type : 2,
			area : [ "700px", "100%" ],
			content : rootPath + '/prestock/stockcheck_add.shtml'
		});
	}
	
	$("#search").click("click", function() {// 绑定查询按扭
		var searchParams = $("#searchForm").serializeJson();
		grid.setOptions({
			data : searchParams
		});
	});
	
	
	
	
	
	
});
